package net.csdn.business.common.domain.request.issue;

import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.io.Serializable;

/**
 * @author likun
 * @date 2022/12/8 18:02
 */
@Data
@JsonNaming(value = PropertyNamingStrategies.SnakeCaseStrategy.class)
public class IssueFromRepoCloseRequestDto implements Serializable {
    /**
     * path 获取
     */
    @NotNull(message = "projectId 不能为空 ", groups = {System.class})
    @Positive(message = "projectId 不合法", groups = {System.class})
    private Long projectId;
    
    /**
     * path 获取
     */
    @NotNull(message = "serialNumber 不能为空 ", groups = {System.class})
    @Positive(message = "serialNumber 不合法", groups = {System.class})
    private Integer serialNumber;

    @NotBlank(message = "uid 不能为空")
    @Length(min = 24, max = 24, message = "uid 不合法")
    private String uid;

    @NotNull(message = "mergeRequestIid 不能为空")
    @Positive(message = "mergeRequestIid 不合法")
    private Long mergeRequestIid;

    /**
     * 代码库完整路径（含完整组路径）
     */
    @NotBlank(message = "pathWithNamespace 不能为空")
    private String pathWithNamespace;
    /**
     * 代码库完整名称（含完整组名称）
     */
    @NotBlank(message = "nameWithNamespace 不能为空")
    private String nameWithNamespace;
}